{include file="header.html"}
<script type="text/javascript" charset="utf-8" src="../htmleditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../htmleditor/ueditor.all.min.js"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="../htmleditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
$(function(){
    $('#article_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success       : function(label){
            label.addClass('right').text('OK!');
        },
        rules : {    
            title : {
                required : true
            },
           
            content    :{
            	 required : true
            },
          
            pic : {
                accept  : 'gif|png|jpe?g'
            }
        },
        messages : {
            title : {
                required : '标题不能为空'
            },
           
            content    : {
            	 required : '内容不能为空'
            },
            pic : {
                accept : '{$lang.limit_img}'
            },
           
        }
    });
});

 
</script>
 
<div id="rightTop">
    <p>微博</p>
    <ul class="subnav">
        <li><a class="btn1" href="index.php?app=weibo">{$lang.manage}</a></li>
    </ul>
</div>

<div class="info">
    <form method="post" enctype="multipart/form-data" id="article_form">
        <table class="infoTable">
            <tr>
                <th class="paddingT15">
                    {$lang.title}:</th>
                <td class="paddingT15 wordSpacing5">
                {if $smarty.get.act=='edit'} 
                 <input class="infoTableInput" id="title" type="text" name="title" value="{$weibo.title|escape}" />
                 {else}
                  {$weibo.title}
                  {/if}
                </td>
            </tr>
 
            <tr>
                <th class="paddingT15">
                    <label for="cate_id">用户:</label></th>
                <td class="paddingT15 wordSpacing5">
                   <a href="index.php?app=user&act=edit&id={$weibo.user_id}">{$weibo.user_name|escape}</a>
                </td>
            </tr>
         <tr>
                <th class="paddingT15">
                    <label for="cate_id">添加时间:</label></th>
                <td class="paddingT15 wordSpacing5">
                    {$weibo.pubdate|date:complete}
                </td>
            </tr>
      
   <tr>
                <th class="paddingT15">
                    <label for="cate_id">微博图片:</label></th>
                <td class="paddingT15 wordSpacing5">
                   
 <!--{foreach from=$weibo.wei_pic item=pic key=st }-->
  <a href="/{$pic}" target="_blank"><img src="/{$pic}" class="makesmall" max_width="120" max_height="90" /></a>&nbsp;&nbsp;
 <!-- {/foreach} -->
                </td>
            </tr>
  
  
  
         <tr>
                <th class="paddingT15">系统图片:</th>
                <td class="paddingT15 wordSpacing5">
                {if $weibo.pic}
                 <a href="/{$weibo.pic}" target="_blank"><img src="/{$weibo.pic}" class="makesmall" max_width="120" max_height="90" /></a>
                {/if}
                   {if $smarty.get.act=='edit'} <input class="infoTableFile2" id="pic" type="file" name="pic" />
                    <label class="field_notice">{$lang.limit_img}</label>{/if}
                </td>
            </tr>
              <tr>
                <th class="paddingT15">内容:</th>
                <td class="paddingT15 wordSpacing5">
                  {if $smarty.get.act=='edit'}
                   <textarea id="content" name="content" style="width:350px;height:100px;">{$weibo.content}</textarea>
                  {else}
                   {$weibo.content}
                   {/if}
                </td>
            </tr> 
            
             <tr>
                <th class="paddingT15">是否系统推荐:</th>
                <td class="paddingT15 wordSpacing5">
                   {if  $weibo.rec}是 {else}否                  
                   {/if}
                </td>
            </tr>
         <tr>
                <th class="paddingT15">设备:</th>
                <td class="paddingT15 wordSpacing5">
                   {$weibo.device}
                </td>
            </tr> 
            
            <tr>
                <th class="paddingT15">分享数:</th>
                <td class="paddingT15 wordSpacing5">
                   {$weibo.sharenum}
                </td>
            </tr>
            <tr>
                <th class="paddingT15">回复数:</th>
                <td class="paddingT15 wordSpacing5">
                   {$weibo.replaynum}
                </td>
            </tr>
            <tr>
                <th class="paddingT15">关注数:</th>
                <td class="paddingT15 wordSpacing5">
                   {$weibo.follownum}
                </td>
            </tr>
            
             
           {if $smarty.get.act=='edit'} 
        <tr>
            <th></th>
            <td class="ptb20">
                <input class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
                <input class="formbtn" type="reset" name="Submit2" value="{$lang.reset}" />
            </td>
        </tr>
        {/if}
        </table>
    </form>
</div>
{include file="footer.html"}
